<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ page import="group9.User" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<!-- Claudio Herreros, Dylan James, Tyler Berg -->

<% 
	User user = (User)session.getAttribute("User");

	if (user == null)
	{
		response.sendRedirect("login.html");
	}
%>
	<head>
		<script type="text/javascript">
			function checkFields(form)
			{
				if (form.title.value == "")
				{
					alert("Please enter a title.");
					form.title.focus();
					return false;
				}
		
				if (form.description.value == "")
				{
					alert("Please enter a description.");
					form.description.focus();
					return false;
				}
				
				return true;
			}
		</script>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
		<link rel="stylesheet" type="text/css" href="styles.css" title="Style 1" />
		<title>Add User Story</title>
	</head>
	<body>
		<h1>Add User Story</h1>
		<a href="/SignOut" class="Signout">SignOut</a></span>
		<br/>
		<hr />
		<br/>
			<form name="addstory" action="/addUserStory" method="post" onsubmit="return checkFields(this);">
				<span  class="BoxLabel">Title:</span>
				<br />
				<input name="title" type="text" />
				<br />
				<br/>
				<span  class="BoxLabel">Description:</span>
				<br />
				<textarea name="description" rows="10" cols="40" ></textarea>
				<br />
				<br/>
				<span  class="BoxLabel">Test Notes:</span>
				<br />
				<textarea name="testnotes" rows="10" cols="40" ></textarea>
				<br />
				<input type="submit" value="Submit" onclick></input>
				</form>
				<br/>
				<hr/>
				<a href="home.jsp">Back!</a>
	</body>
</html>